package com.web.netty.domain;

import java.io.Serializable;
import java.util.Arrays;

/**
 * @Author: wws
 * describe:
*/
public class Token implements Serializable {
    private byte[] token;

    public Token() {
    }

    public Token(byte[] token) {
        this.token = token;
    }

    public byte[] getToken() {
        return token;
    }

    public void setToken(byte[] token) {
        this.token = token;
    }

    @Override
    public String toString() {
        return "Token{" +
                "token=" + Arrays.toString(token) +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Token token1 = (Token) o;
        return Arrays.equals(token, token1.token);
    }

    @Override
    public int hashCode() {
        return Arrays.hashCode(token);
    }
}
